package net.comm.group.db;


import java.sql.ResultSet;
import java.sql.SQLException;


import net.comm.group.bean.BaseGFollForum;
import net.comm.group.bean.BaseGdianping;
import net.comm.group.bean.BaseGForum;
import net.comm.group.bean.BaseGdpGroupby;
import net.comm.group.bean.BaseGroups;
import net.comm.oper.bean.Baseoperlog;
import net.comm.util.StringUtil;

import org.sakaiproject.db.api.SqlReader;

public class DbGdpGroupbyService implements SqlReader
{

	/**
	 * Read from the result one set of fields to create a Resource.
	 * 
	 * @param result
	 *        The Sql query result.
	 * @return The Resource object.
	 */
	public Object readSqlResultRecord(ResultSet result)
	{
		try
		{
			String  dsort = StringUtil.getValue(result.getString(1));		//	所属板块
			String  dtype = StringUtil.getValue(result.getString(2));		//	点评类型
			int  dtypeSum = result.getInt(3);								//	点评统计
			int  	userID = result.getInt(4);								//	用户ID
			String  userNick = StringUtil.getValue(result.getString(5));	//	用户名称
			int  	userPicID = result.getInt(6);							//	用户照片

			// create the Resource from these fields
			return new BaseGdpGroupby( dsort,  dtype,  dtypeSum, userID,  userNick,  userPicID );
		}
		catch (SQLException e)
		{
			return null;
		}
		
	}
}
